package com.qsxc.dao.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.qsxc.business.bean.R;
import com.qsxc.business.promoter.bean.req.BindWechatUserReq;
import com.qsxc.business.promoter.bean.req.UnBindWechatUserReq;
import com.qsxc.business.promoter.bean.vo.PromoterFundsInfoVo;
import com.qsxc.business.promoter.bean.vo.PromoterUserInfoVo;
import com.qsxc.dao.entity.SmPromoter;

import javax.servlet.http.HttpServletResponse;

/**
 * <p>
 * 推广员信息表 服务类
 * </p>
 *
 * @author
 * @since 2024-09-25
 */
public interface ISmPromoterService extends IService<SmPromoter> {
    /**
     * 推广员公众号服务
     */
    R<String> sendRedirect(String code, String callBackJson, String url, HttpServletResponse response) throws Exception;

    /**
     * 推广员微信用户绑定
     *
     * @param bindWechatUserReq
     * @return
     * @throws Exception
     */
    R bindWechatUser(BindWechatUserReq bindWechatUserReq) throws Exception;

    /**
     * 推广员微信用户解绑
     *
     * @param unBindWechatUserReq
     * @return
     * @throws Exception
     */
    R unBindWechatUser(UnBindWechatUserReq unBindWechatUserReq) throws Exception;

    /**
     * 获取推广员微信用户信息
     *
     * @param openid
     * @return
     * @throws Exception
     */
    R<PromoterUserInfoVo> getWechatUserInfo(String openid) throws Exception;

    /**
     * 根据openid获取推广员资金信息
     *
     * @param openid
     * @return
     * @throws Exception
     */
    R<PromoterFundsInfoVo> getFundsInfo(String openid) throws Exception;

}
